package com.pinyougou.mapper;

import com.pinyougou.pojo.Brand;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface BrandMapper extends Mapper<Brand>
{
    /** 模糊查询 */
    List<Brand> findByLike(Brand brand);

    /** 查找所有的品牌名称和id */
    @Select("select id, name as text from tb_brand")
    List<Map<String,Object>> findIdNameList();
    /*@Select("select * from tb_brand order by id desc")
    List<Brand> findAll();*/
}
